import csv

csvfile=open("出租车GPS数据.csv","r")
reader=csv.reader(csvfile)

jing=0
wei=1
licenseNum=2
time=3

def getTime(i:list):
    t = i[time]
    t = t.split(' ')
    return t

def getHouMinSen(t:list):
    _, time = t
    time = time.split(':')
    return time

all={}
for i in reader:
    t=getTime(i)
    day,_=t
    if day=='2014-06-12':
        h,_,_=getHouMinSen(t)
        if h in all.keys():
            all[h]+=1
        else:
            all[h]=1

for hour,times in all.items():
    print(str(hour)+','+str(times))

import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei'] # 中文
import pltHelp
plt.plot(list(all.keys()), list(all.values()), mec='r', mfc='w')
pltHelp.show('时刻','机场出租车数量')